package com.wn.demo01;

/**
 * @author yellow Docter
 * @date 2022 -10-28
 * @desc
 *  函数式接口可以进行参数传递
 */
public class Demo02 {

    public static void main(String[] args) {

        demo01("今晚需要上晚自习",s -> System.out.println(s));

    }

    private static void demo01(String msg,MyFunction<String> myFunction) {
        myFunction.consumer(msg);
    }

}
